const readline = require("readline-sync");
console.log("石头剪刀布 1.石头 2.剪刀 3.布");
var player = readline.question("input: ");
var computer = Math.floor(Math.random() * 3 + 1);
console.log("computer: " + computer);
var result = 0;
switch (computer) {
    case 1:
        {
            if (player == computer) {
                result = 1;
            } else if (player == 2) {
                result = 2;
            } else {
                result = 3;
            }
            break;
        }
    case 2:
        {
            if (player == computer) {
                result = 1;
            } else if (player == 3) {
                result = 2;
            } else {
                result = 3;
            }
            break;
        }
    case 3:
        {
            if (player == computer) {
                result = 1;
            } else if (player == 1) {
                result = 2;
            } else {
                result = 3;
            }
            break;
        }
}
switch (result) {
    case 1:
        {
            console.log("平局");
            break;
        }
    case 2:
        {
            console.log("您输了");
            break;
        }
    case 3:
        {
            console.log("您赢了");
            break;
        }
}